a = ['python', 'java', 'c++', 'php']
mums = input("请输入需要访问的第几个元素的下标")
try:
    mums = int(mums)
    print(f"您访问的下标为{mums}的元素是{a[mums]}")
except ValueError as e:
    print('出错了，下标必须输入整数')
except IndexError as e:
    print('出错了，下标超过最大限制了')
